home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util1 / wgrab.lha / wgrab_cat.h < prev    next >
C/C++ Source or Header  |  1995-10-29  |  7KB  |  269 lines

  1. #ifndef WGRAB_CAT_H
  2. #define WGRAB_CAT_H
  3.  
  4.  
  5. /****************************************************************************/
  6.  
  7.  
  8. /* This file was created automatically by CatComp.
  9.  * Do NOT edit by hand!
  10.  */
  11.  
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifdef CATCOMP_ARRAY
  18. #undef CATCOMP_NUMBERS
  19. #undef CATCOMP_STRINGS
  20. #define CATCOMP_NUMBERS
  21. #define CATCOMP_STRINGS
  22. #endif
  23.  
  24. #ifdef CATCOMP_BLOCK
  25. #undef CATCOMP_STRINGS
  26. #define CATCOMP_STRINGS
  27. #endif
  28.  
  29.  
  30. /****************************************************************************/
  31.  
  32.  
  33. #ifdef CATCOMP_NUMBERS
  34.  
  35. #define MSG_PROJECT 0
  36. #define MSG_SETTINGS 1
  37. #define MSG_ABOUT 2
  38. #define MSG_ABOUT_SC 3
  39. #define MSG_HIDE 4
  40. #define MSG_HIDE_SC 5
  41. #define MSG_QUIT 6
  42. #define MSG_QUIT_SC 7
  43. #define MSG_LOAD 8
  44. #define MSG_LOADENV 9
  45. #define MSG_LOADDEF 10
  46. #define MSG_USE 11
  47. #define MSG_SAVE 12
  48. #define MSG_ASK_BEFORE 13
  49. #define MSG_ASK_HELP 14
  50. #define MSG_FILENAME 15
  51. #define MSG_FILENAME_HELP 16
  52. #define MSG_DIR_MODE 17
  53. #define MSG_DIR_MODE_HELP 18
  54. #define MSG_HOTKEY_POPUP 19
  55. #define MSG_HOTKEY_POPUP_HELP 20
  56. #define MSG_HOTKEY_WGRAB 21
  57. #define MSG_HOTKEY_WGRAB_HELP 22
  58. #define MSG_HOTKEY_SGRAB 23
  59. #define MSG_HOTKEY_SGRAB_HELP 24
  60. #define MSG_HELP_HELP 25
  61. #define MSG_GUI_SAVE 26
  62. #define MSG_GUI_USE 27
  63. #define MSG_GUI_QUIT 28
  64.  
  65. #endif /* CATCOMP_NUMBERS */
  66.  
  67.  
  68. /****************************************************************************/
  69.  
  70.  
  71. #ifdef CATCOMP_STRINGS
  72.  
  73. #define MSG_PROJECT_STR "Project"
  74. #define MSG_SETTINGS_STR "Settings"
  75. #define MSG_ABOUT_STR "About"
  76. #define MSG_ABOUT_SC_STR "?"
  77. #define MSG_HIDE_STR "Hide"
  78. #define MSG_HIDE_SC_STR "h"
  79. #define MSG_QUIT_STR "Quit"
  80. #define MSG_QUIT_SC_STR "q"
  81. #define MSG_LOAD_STR "Load last Used"
  82. #define MSG_LOADENV_STR "Load last Saved"
  83. #define MSG_LOADDEF_STR "Load Default"
  84. #define MSG_USE_STR "Use"
  85. #define MSG_SAVE_STR "Save"
  86. #define MSG_ASK_BEFORE_STR "Ask Before"
  87. #define MSG_ASK_HELP_STR "Ask For Filename before saving"
  88. #define MSG_FILENAME_STR "FileName"
  89. #define MSG_FILENAME_HELP_STR "File or Directory Name"
  90. #define MSG_DIR_MODE_STR "Dir Mode"
  91. #define MSG_DIR_MODE_HELP_STR "Filename will be [dir]pic<hour>.<min>.<sec>.iff"
  92. #define MSG_HOTKEY_POPUP_STR "Popup"
  93. #define MSG_HOTKEY_POPUP_HELP_STR "Hotkey to PopUp this Window"
  94. #define MSG_HOTKEY_WGRAB_STR "Window Grab"
  95. #define MSG_HOTKEY_WGRAB_HELP_STR "Hotkey to Grab Active Window"
  96. #define MSG_HOTKEY_SGRAB_STR "Screen Grab"
  97. #define MSG_HOTKEY_SGRAB_HELP_STR "Hotkey to Grab Active Screen"
  98. #define MSG_HELP_HELP_STR "Small Help Text"
  99. #define MSG_GUI_SAVE_STR "_Save"
  100. #define MSG_GUI_USE_STR "_Use"
  101. #define MSG_GUI_QUIT_STR "_Quit WGrab"
  102.  
  103. #endif /* CATCOMP_STRINGS */
  104.  
  105.  
  106. /****************************************************************************/
  107.  
  108.  
  109. #ifdef CATCOMP_ARRAY
  110.  
  111. struct CatCompArrayType
  112. {
  113.     LONG   cca_ID;
  114.     STRPTR cca_Str;
  115. };
  116.  
  117. static const struct CatCompArrayType CatCompArray[] =
  118. {
  119.     {MSG_PROJECT,(STRPTR)MSG_PROJECT_STR},
  120.     {MSG_SETTINGS,(STRPTR)MSG_SETTINGS_STR},
  121.     {MSG_ABOUT,(STRPTR)MSG_ABOUT_STR},
  122.     {MSG_ABOUT_SC,(STRPTR)MSG_ABOUT_SC_STR},
  123.     {MSG_HIDE,(STRPTR)MSG_HIDE_STR},
  124.     {MSG_HIDE_SC,(STRPTR)MSG_HIDE_SC_STR},
  125.     {MSG_QUIT,(STRPTR)MSG_QUIT_STR},
  126.     {MSG_QUIT_SC,(STRPTR)MSG_QUIT_SC_STR},
  127.     {MSG_LOAD,(STRPTR)MSG_LOAD_STR},
  128.     {MSG_LOADENV,(STRPTR)MSG_LOADENV_STR},
  129.     {MSG_LOADDEF,(STRPTR)MSG_LOADDEF_STR},
  130.     {MSG_USE,(STRPTR)MSG_USE_STR},
  131.     {MSG_SAVE,(STRPTR)MSG_SAVE_STR},
  132.     {MSG_ASK_BEFORE,(STRPTR)MSG_ASK_BEFORE_STR},
  133.     {MSG_ASK_HELP,(STRPTR)MSG_ASK_HELP_STR},
  134.     {MSG_FILENAME,(STRPTR)MSG_FILENAME_STR},
  135.     {MSG_FILENAME_HELP,(STRPTR)MSG_FILENAME_HELP_STR},
  136.     {MSG_DIR_MODE,(STRPTR)MSG_DIR_MODE_STR},
  137.     {MSG_DIR_MODE_HELP,(STRPTR)MSG_DIR_MODE_HELP_STR},
  138.     {MSG_HOTKEY_POPUP,(STRPTR)MSG_HOTKEY_POPUP_STR},
  139.     {MSG_HOTKEY_POPUP_HELP,(STRPTR)MSG_HOTKEY_POPUP_HELP_STR},
  140.     {MSG_HOTKEY_WGRAB,(STRPTR)MSG_HOTKEY_WGRAB_STR},
  141.     {MSG_HOTKEY_WGRAB_HELP,(STRPTR)MSG_HOTKEY_WGRAB_HELP_STR},
  142.     {MSG_HOTKEY_SGRAB,(STRPTR)MSG_HOTKEY_SGRAB_STR},
  143.     {MSG_HOTKEY_SGRAB_HELP,(STRPTR)MSG_HOTKEY_SGRAB_HELP_STR},
  144.     {MSG_HELP_HELP,(STRPTR)MSG_HELP_HELP_STR},
  145.     {MSG_GUI_SAVE,(STRPTR)MSG_GUI_SAVE_STR},
  146.     {MSG_GUI_USE,(STRPTR)MSG_GUI_USE_STR},
  147.     {MSG_GUI_QUIT,(STRPTR)MSG_GUI_QUIT_STR},
  148. };
  149.  
  150. #endif /* CATCOMP_ARRAY */
  151.  
  152.  
  153. /****************************************************************************/
  154.  
  155.  
  156. #ifdef CATCOMP_BLOCK
  157.  
  158. static const char CatCompBlock[] =
  159. {
  160.     "\x00\x00\x00\x00\x00\x08"
  161.     MSG_PROJECT_STR "\x00"
  162.     "\x00\x00\x00\x01\x00\x0A"
  163.     MSG_SETTINGS_STR "\x00\x00"
  164.     "\x00\x00\x00\x02\x00\x06"
  165.     MSG_ABOUT_STR "\x00"
  166.     "\x00\x00\x00\x03\x00\x02"
  167.     MSG_ABOUT_SC_STR "\x00"
  168.     "\x00\x00\x00\x04\x00\x06"
  169.     MSG_HIDE_STR "\x00\x00"
  170.     "\x00\x00\x00\x05\x00\x02"
  171.     MSG_HIDE_SC_STR "\x00"
  172.     "\x00\x00\x00\x06\x00\x06"
  173.     MSG_QUIT_STR "\x00\x00"
  174.     "\x00\x00\x00\x07\x00\x02"
  175.     MSG_QUIT_SC_STR "\x00"
  176.     "\x00\x00\x00\x08\x00\x10"
  177.     MSG_LOAD_STR "\x00\x00"
  178.     "\x00\x00\x00\x09\x00\x10"
  179.     MSG_LOADENV_STR "\x00"
  180.     "\x00\x00\x00\x0A\x00\x0E"
  181.     MSG_LOADDEF_STR "\x00\x00"
  182.     "\x00\x00\x00\x0B\x00\x04"
  183.     MSG_USE_STR "\x00"
  184.     "\x00\x00\x00\x0C\x00\x06"
  185.     MSG_SAVE_STR "\x00\x00"
  186.     "\x00\x00\x00\x0D\x00\x0C"
  187.     MSG_ASK_BEFORE_STR "\x00\x00"
  188.     "\x00\x00\x00\x0E\x00\x20"
  189.     MSG_ASK_HELP_STR "\x00\x00"
  190.     "\x00\x00\x00\x0F\x00\x0A"
  191.     MSG_FILENAME_STR "\x00\x00"
  192.     "\x00\x00\x00\x10\x00\x18"
  193.     MSG_FILENAME_HELP_STR "\x00\x00"
  194.     "\x00\x00\x00\x11\x00\x0A"
  195.     MSG_DIR_MODE_STR "\x00\x00"
  196.     "\x00\x00\x00\x12\x00\x30"
  197.     MSG_DIR_MODE_HELP_STR "\x00"
  198.     "\x00\x00\x00\x13\x00\x06"
  199.     MSG_HOTKEY_POPUP_STR "\x00"
  200.     "\x00\x00\x00\x14\x00\x1C"
  201.     MSG_HOTKEY_POPUP_HELP_STR "\x00"
  202.     "\x00\x00\x00\x15\x00\x0C"
  203.     MSG_HOTKEY_WGRAB_STR "\x00"
  204.     "\x00\x00\x00\x16\x00\x1E"
  205.     MSG_HOTKEY_WGRAB_HELP_STR "\x00\x00"
  206.     "\x00\x00\x00\x17\x00\x0C"
  207.     MSG_HOTKEY_SGRAB_STR "\x00"
  208.     "\x00\x00\x00\x18\x00\x1E"
  209.     MSG_HOTKEY_SGRAB_HELP_STR "\x00\x00"
  210.     "\x00\x00\x00\x19\x00\x10"
  211.     MSG_HELP_HELP_STR "\x00"
  212.     "\x00\x00\x00\x1A\x00\x06"
  213.     MSG_GUI_SAVE_STR "\x00"
  214.     "\x00\x00\x00\x1B\x00\x06"
  215.     MSG_GUI_USE_STR "\x00\x00"
  216.     "\x00\x00\x00\x1C\x00\x0C"
  217.     MSG_GUI_QUIT_STR "\x00"
  218. };
  219.  
  220. #endif /* CATCOMP_BLOCK */
  221.  
  222.  
  223. /****************************************************************************/
  224.  
  225.  
  226. struct LocaleInfo
  227. {
  228.     APTR li_LocaleBase;
  229.     APTR li_Catalog;
  230. };
  231.  
  232.  
  233. #ifdef CATCOMP_CODE
  234.  
  235. STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
  236. {
  237. LONG   *l;
  238. UWORD  *w;
  239. STRPTR  builtIn;
  240.  
  241.     l = (LONG *)CatCompBlock;
  242.  
  243.     while (*l != stringNum)
  244.     {
  245.         w = (UWORD *)((ULONG)l + 4);
  246.         l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  247.     }
  248.     builtIn = (STRPTR)((ULONG)l + 6);
  249.  
  250. #define XLocaleBase LocaleBase
  251. #define LocaleBase li->li_LocaleBase
  252.     
  253.     if (LocaleBase)
  254.         return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
  255. #define LocaleBase XLocaleBase
  256. #undef XLocaleBase
  257.  
  258.     return(builtIn);
  259. }
  260.  
  261.  
  262. #endif /* CATCOMP_CODE */
  263.  
  264.  
  265. /****************************************************************************/
  266.  
  267.  
  268. #endif /* WGRAB_CAT_H */
  269.